package com.moli.iov.base.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.moli.iov.base.model.dto.req.VehicleAttentionReqDto;
import com.moli.iov.base.model.dto.req.VehicleFollowGroupReqDto;
import com.moli.iov.base.model.po.VehicleAttention;
import com.moli.iov.base.model.po.VehicleFollowGroup;
import com.moli.iov.rest.RestResponse;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 车辆关注组表 服务类
 * </p>
 *
 * @author OAK
 * @since 2020/2/20 09:42 AM.
 */
public interface IVehicleFollowGroupService extends IService<VehicleFollowGroup> {


    public static enum ModelStatus {
     SAVE,
     UPDATE,
     DELETE
  }

  /**
   * 车辆关注组保存
   */
  RestResponse save(VehicleFollowGroupReqDto vehicleFollowGroupReqDto);

  /**
   * 车辆取消关注组删除缓存
   */
  RestResponse saveOrUpdate(VehicleFollowGroupReqDto vehicleFollowGroupReqDto);

  Map<Long, String> findNameByUserId(Long userId);

  /**
   * 查询用户关注组
   *
   * @return 用户关注组
   */
  Map<String, Set<String>> findVehicleFollowGroupByUserId(Long userId);

  /**
   * 根据模型状态批量操作关注组
   */
  void batch(List<VehicleFollowGroup> list, Long userId, ModelStatus status);

  /**
   * 初始化
   */
  void init();

  /**
   * 根据userId获取关注组列表
   *
   * @param userId
   * @return
   */
  List<VehicleFollowGroup> findByUserId(Long userId);
}
